﻿using System;

namespace Yaml.Serialization.Events {
    public class ScalarEvent : TaggedEvent {
    private ValueStyle valueStyle;
    private string value;
    private bool isPlainImplicit;
    private bool isQuotedImplicit;

    public ScalarEvent(string anchor, string tag, bool isPlainImplicit, bool isQuotedImplicit, string value, ValueStyle valueStyle)
        : base(tag, anchor) {
        this.isPlainImplicit = isPlainImplicit;
        this.isQuotedImplicit = isQuotedImplicit;
        this.value = value;
        this.valueStyle = valueStyle;
    }

    public ValueStyle ValueStyle{
        get { return this.valueStyle; }
    }

    public string Value {
        get { return this.value; }
    }

    public bool PlainImplicit {
        get { return this.isPlainImplicit; }
    }

    public bool QuotedImplicit {
        get { return this.isQuotedImplicit; }
    }

    public override string ToString() {
        return "#<" + this.GetType().Name + " value=\"" + value + "\">";
    }

    }
}
